﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ReservoirDAL;
using ReservoirModel;

namespace ReservoirBLL
{
    public class UserBLL
    {
        UserDAL userDAL=new UserDAL();
        /// <summary>
        /// 列表显示信息
        /// </summary>
        /// <returns></returns>
        public List<TBRecord> GetListInfo()
        {
            return userDAL.GetList();
        }
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public int AddInfo(TBRecord info)
        {
            return userDAL.Add(info);
        }
        /// <summary>
        /// 通过当前用户UserId获取该用户信息
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        public List<TBRecord> GetInfo(string userID)
        { 
           return userDAL.GetInfoById(userID);  
        }
        /// <summary>
        /// 删除信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DeleteInfo(int id)
        {
            return userDAL.Delete(id);
        }
    }
}
